<template>
	<!-- <view>
		<table class="table1" border="1">
			<td>选择</td>
			<td>1</td>
			<td>2</td>
			<td>3</td>
			<checkbox-group @change="list">
				<tr v-for="(item,index) in 5" :key="index">
					<td>
						<label>
							<checkbox :value="2" />
						</label>
					</td>
					<td>100</td>
					<td>200</td>
					<td>300</td>
				</tr>
			</checkbox-group>
		</table>
		<button size="mini" type="primary">提交</button>
	</view> -->
	<!-- 	<view class="uni-list">
				<checkbox-group @change="checkboxChange">
					<label class="uni" v-for="(item,index) in 5" :key="index">
						<view>
							<checkbox :value="item" :checked="item.checked" />
						</view>
						<view>{{item}}</view>
					</label>
				</checkbox-group>
			</view> -->
<!-- 	<view class="imageList" v-for="(item,index) in imageLists" :key="index">
		<image :src="item" mode="aspectFill"></image>
	</view>
	<input type="file" @click="uploadFiles" /> -->
	<!-- <button size="default" type="primary" @click="uploadFiles">上传文件</button> -->
	<!-- <button size="default" type="primary" @click="submit">确定上传</button> -->
<!-- 	<view>
		<button type="primary" @click="setToken">设置token</button>
		<p>{{tokenString}}</p>
	</view> -->
	<!-- <view class="timeCount" style="font-size: 20px;">
		{{countNum}}
	</view>
	<button type="primary" @click="startTime">开始计时</button>
	<button type="primary" @click="stopTime">计时结束</button> -->
	<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
		<swiper-item  v-for="(item,index) in 5" :key="index">
			<view class="swiper-item" @click="getIdInfo(index)">
				<image src="../../static/logo.png" mode=""></image>
			</view>
		</swiper-item>
	</swiper>
</template>

<script>
	export default {
		data() {
			return {
				countNum:0,
				timer:''
			}
		},
		// onLoad() {
		// 	this.
		// }
		methods: {
			getIdInfo(e){
				console.log(e)
			}
			// startTime(){
			// 	this.timer = setInterval(()=>{
			// 		this.countNum++
			// 	},1000)
			// },
			// stopTime(){
			// 	clearInterval(this.timer)
			// 	this.timer=0
			// }
			// setToken(){
			// 	uni.setStorageSync('token',"11111111111111")
			// 	this.tokenString = uni.getStorageSync('token')
			// 	uni.showLoading()
			// 	uni.showToast({
			// 		title:this.tokenString
			// 	})
			// 	// console.log(uni.getStorageInfoSync())
			// }
			// uploadFiles(e) {
			// 	uni.chooseFile({
			// 		count:1,
			// 		success:(e)=> {
			// 			const tempPath = e.tempFilePaths
			// 			tempPath.forEach((item,index)=>{
			// 				this.imageLists.push(item)
			// 			})
			// 		}
			// 	})
			// },
			// submit(){
			// 	uni.request({
			// 		url:"http://localhost:8000/api/uploadfile",
			// 		method:'POST',
			// 		data:{
			// 			info:JSON.stringify(this.imageLists)
			// 		},
			// 		success:(e) =>{
			// 			console.log(e)
			// 		}
			// 	})
			// }
		}
	}
</script>

<style lang="scss">
	.imageList{
		display: flex;
		width: 200px;
		height: 100px;

		image{
			width: 100px;
			height: 100px;
			overflow: hidden;
			flex-shrink: 0;
		}
		
	}
	.table1 {
		border: 1px red solid;
		// td{
		// 	bor
		// }
	}
</style>